package com.gitee.dbswitch.data.domain;

import com.gitee.dbswitch.common.entity.CloseableDataSource;
import com.gitee.dbswitch.core.exchange.MemChannel;
import com.gitee.dbswitch.core.task.TaskParam;
import com.gitee.dbswitch.data.config.DbswtichPropertiesConfiguration;
import com.gitee.dbswitch.schema.TableDescription;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.CountDownLatch;


/**
 * api http 请求线程的传参
 *
 * @author natural
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class APIHttpParam implements TaskParam {
    private String apiURL;
    private String requestMethod;
    private String synchronizeType;
    private List<Map<String,String>> apiParams;
    private List<Map<String,String>> apiHeaders;
    private String apiBody;
    private String apiJsonRoot;
    private String apiJsonPosition;
    private CloseableDataSource targetDataSource;
    private Set<String> targetExistTables;
    private DbswtichPropertiesConfiguration configuration;
    private TableDescription tableDescription;
    private MemChannel memChannel;
    private CountDownLatch apiCountDownLatch;
}
